import request from '@/utils/request'

// 查询列表
export function list(query) {
    return request({
      url: '/aitcommon/aittask/list',
      method: 'get',
      params: query
    })
  }

// 手工触发
export function manual(ids) {
  return request({
    url: '/aitcommon/aittask/trigger',
    method: 'post',
    data: ids
  })
}

// 暂停所有任务
export function pauseAll() {
  return request({
    url: '/aitcommon/aittask/pauseall',
    method: 'post'
  })
}

// 暂停任务
export function pause(ids) {
  return request({
    url: '/aitcommon/aittask/pause',
    method: 'post',
    data: ids
  })
}

// 恢复任务
export function resume(ids) {
  return request({
    url: '/aitcommon/aittask/resume',
    method: 'post',
    data: ids
  })
}

// 加载源文件
export function reload() {
  return request({
    url: '/aitcommon/aittask/reload',
    method: 'get',
  })
}